<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>同城</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link href="../../plugins/mui/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../../css/city/reset.css">
		<link rel="stylesheet" href="../../css/city/index.css">
		<script src="../../js/statistics.js"></script>
	</head>
	<body>
		<div class="title communication">
			同城交流
		</div>
		<div class="imgs clear">
			<a class="img imgr fl" id="totribune">
				<img src="../../images/city_life/TCLT.png" alt="同城论坛" />
				<div class="bg_"></div>
				<div class="bg">同城论坛</div>
			</a>
			<a class="img fr" id="tointerest">
				<img src="../../images/city/logo1_2@2x.png" alt="兴趣调频" />
				<div class="bg_"></div>
				<div class="bg">兴趣调频</div>
			</a>
		</div>
		<div class="imgs">
			<a class="img imglong" id="todiscuss">
				<img src="../../images/city_life/ZTTL.png" alt="专题讨论" />
				<div class="bg_"></div>
				<div class="bg">专题讨论</div>
			</a>
		</div>
		<div class="title life">
			同城生活
		</div>
		<div class="imgs clear comv">
			<a class="img imgr fl" id="toactivity">
				<img src="../../images/city_life/TCHD.png" alt="同城活动" />
				<div class="bg_"></div>
				<div class="bg">同城活动</div>
			</a>
			<a class="img fr" id="sop">
				<img src="../../images/city_life/city@4.png" alt="白茶专题" />
				<div class="bg_"></div>
				<div class="bg">茶叶节专题</div>
			</a>
			<a class="img imglong fl" id="totipoff">
				<img src="../../images/city/logo2_3@2x.png" alt="兴趣调频" />
				<div class="bg_"></div>
				<div class="bg">你问我答</div>
			</a>
		</div>
		
		<div class="title vr">
			同城VR
		</div>
		<div class="imgs">
			<a class="img imglong" id="tovr">
				<img src="../../images/city/logo3_1@2x.png" alt="同城论坛" />
				<div class="bg_"></div>
				<div class="bg">溧阳全景</div>
			</a>
		</div>
		

		<script src="../../plugins/mui/mui.min.js"></script>
		<script src="../../plugins/jquery/jquery-3.1.0.min.js"></script>
		<script src="../../js/getApiToken.js"></script>
		<script src="../../js/md5.js"></script>
		<script>
		mui.init({

		});
		mui.plusReady(function(){
			//关闭等待框
			plus.nativeUI.closeWaiting();
			//显示当前页面
			mui.currentWebview.show('slide-in-right',200);
			//跳转论坛主页
			document.getElementById('totribune').addEventListener('tap',function(e){
				e.detail.gesture.preventDefault(); //修复iOS 8.x
				var this_ = this ;
				this_.getElementsByClassName('bg_' )[0].style.opacity = '0.01';
				setTimeout(function(){
					mui.openWindow({
						url:'tribune_index.html',
						id:'tribune_index',
						extras:{
							type:'alone'
						},
						show:{
							autoShow:true,
							aniShow:'slide-in-right',
							duration:200
						},
						waiting:{
							autoShow:true,
							title:'正在加载...'
						}
					});
					this_.getElementsByClassName('bg_' )[0].style.opacity = '0.30';
				},300)
			});
			//跳转兴趣调频主页
			document.getElementById('tointerest').addEventListener('tap',function(e){
				e.detail.gesture.preventDefault(); //修复iOS 8.x
				var this_ = this ;
				this_.getElementsByClassName('bg_' )[0].style.opacity = '0.01';
				setTimeout(function()
				{
					mui.openWindow( {
						url: 'interest_index.html',
						id: 'interest_index',
						show: {
							autoShow: false,
							aniShow: 'slide-in-right',
							duration: 200
						},
						waiting: {
							autoShow: true,
							title: '正在加载...'
						}
					} );
					this_.getElementsByClassName('bg_' )[0].style.opacity = '0.30';
				},300)
			});
			//跳转vr主页
			document.getElementById('tovr').addEventListener('tap',function(e){
				e.detail.gesture.preventDefault(); //修复iOS 8.x
				var this_ = this ;
				this_.getElementsByClassName('bg_' )[0].style.opacity = '0.01';
				setTimeout(function()
				{
					mui.openWindow( {
						url: 'vr_index.html',
						id: 'vr_index',
						show: {
							autoShow: false,
							aniShow: 'slide-in-right',
							duration: 200
						},
						waiting: {
							autoShow: true,
							title: '正在加载...'
						}
					} );
					this_.getElementsByClassName('bg_' )[0].style.opacity = '0.30';
				},300)
			});
			//跳转同城生活
//			document.getElementById('toactivity').addEventListener("tap",function(e){
//				console.log('-----')
//				e.detail.gesture.preventDefault();//修复ios 8.x
//				var this_ = this ;
//				this_.getElementsByClassName('bg_' )[0].style.opacity = '0.01';
//				setTimeout(function()
//				{
//					mui.openWindow( {
//						url: 'activity_index.html',
//						id: 'activity_index',
//						show: {
//							autoShow: false,
//							aniShow: 'slide-in-right',
//							duration: 200
//						},
//						waiting: {
//							autoShow: true,
//							title: '正在加载...'
//						}
//					} );
//					this_.getElementsByClassName('bg_' )[0].style.opacity = '0.30';
//				},300)
//			})

				//跳转同城生活
				$('.comv').on('tap', '#toactivity', function(e) {
					e.detail.gesture.preventDefault();//修复ios 8.x
					var this_ = this ;
					this_.getElementsByClassName('bg_' )[0].style.opacity = '0.01';
					setTimeout(function(){
						mui.openWindow({
							url:'activity_0.html',
							id:'activity_0'

						});
						this_.getElementsByClassName('bg_' )[0].style.opacity = '0.30';
					},300)
				})
				//跳转白茶专题页面
				$('.comv').on('tap', '#sop', function(e) {
					console.log('//');
					e.detail.gesture.preventDefault();//修复ios 8.x
					var this_ = this ;
					this_.getElementsByClassName('bg_' )[0].style.opacity = '0.01';
					setTimeout(function(){
						mui.openWindow({
							url:'../index/tourist.html',
							id:'tourist'
						});
						this_.getElementsByClassName('bg_' )[0].style.opacity = '0.30';
					},300)
				})
			//未开发页面
//			document.getElementById("sop").addEventListener('tap',building );
			document.getElementById("todiscuss").addEventListener('tap',building );
			document.getElementById("totipoff").addEventListener('tap',building );
		});
		//兼容calc
		//calc();
		function calc(){
			var ww =document.body.clientWidth;
			var img = $('.img');
			var imglong = $('.imglong');
			img.width((ww/2 -18));
			img.height((ww/2 -18)*0.65);
			imglong.width((ww-26));
			imglong.height((ww/2 -18)*0.65);
			$('.img .bg').css('line-height',(ww/2 -18)*0.65+'px');

		}
		function building(){
			mui.toast('正在建设中...');
		}
		function tovr(){
			mui.openWindow({
				url:'vr_index.html',
				id:'vr_index',
				show:{
					autoShow:true,
					aniShow:'slide-in-right',
					duration:200
				},
				waiting:{
					autoShow:true,
					title:'正在加载...'
				}
			})
		}
		</script>
	</body>
</html>
